import http from "@/http"
import {SysDictType, SysDictTypeListParam} from '@/api/sysDictType/type.ts'

// 新增字典类型
export const addApi = (data: SysDictType) => {
    return http.post("/system/dict/type/insert", data)
}

// 分页获取字典类型列表
export const getListApi = (data: SysDictTypeListParam) => {
    return http.get("/system/dict/type/list", data)
}

// 获取字典下拉列表
export const getOptionSelect = () => {
    return http.get('/system/dict/type/optionSelect')
}

// 编辑字典类型
export const editApi = (data: SysDictType) => {
    return http.put("/system/dict/type/update", data)
}

// 删除字段类型
export const deleteApi = (userId: number) => {
    return http.delete(`/system/dict/type/delete/${userId}`)
}
